
using UnityEngine;

public class FilePath
{
    public static readonly string root = $"{Application.dataPath}/gameData/";
    public const string HOME_DIRECTORY_SYMBOL = "~/";

    //Runtime Paths
    public static readonly string gameSaves = $"{runtimePath}Save Files/";

    //Resource Paths
    public static readonly string resource_font = "Fonts/";

    public static readonly string resource_graphics = "Graphics/";
    public static readonly string resource_backgroundImages = $"{resource_graphics}BG Images/";
    public static readonly string resource_backgroundVideos = $"{resource_graphics}BG Videos/";
    public static readonly string resource_blendTexture = $"{resource_graphics}Transition Effects/";

    public static readonly string resource_audio = "Audio/";
    public static readonly string resource_sfx = $"{resource_audio}SFX/";
    public static readonly string resource_voices = $"{resource_audio}Voices/";
    public static readonly string resource_music = $"{resource_audio}Music/";
    public static readonly string resource_ambience = $"{resource_audio}Ambience/";

    public static readonly string resource_dialogueFiles = $"Dialogue Files/";

    public static string GetPathToResource(string defaultPath,string resourceName)
    {
        if (resourceName.StartsWith(HOME_DIRECTORY_SYMBOL))
            return resourceName.Substring(HOME_DIRECTORY_SYMBOL.Length);
        return defaultPath + resourceName;
    }

    public static string runtimePath
    {
        get
        {
            #if UNITY_EDITOR
                return "Assets/appdata/";
            #else
                return Application.persistentDataPath + "/appdata/";
            #endif
        }
    }

}
